#pragma once


class IObject;

#include <list>
using std::list;

#include "Renderer.h"


class CObjectManager
{
public:
	/* SINGLETON */
	static	CObjectManager*		GetInstance( void );
	static	void				DeleteInstance( void );

	friend CRenderer;


	void	AddObject		( IObject* ptr );
	void	RemoveObject	( IObject* ptr );
	void	RemoveAllObjects( void );

	void	UpdateAllObjects( float fElapsedTime );
	void	PauseAllObjects( void );

	bool	Paused( void )	{	return m_bPaused;	}

private:
	/* SINGLETON */
	static CObjectManager*	s_Instance;

	CObjectManager(void);
	~CObjectManager(void);
	CObjectManager( const CObjectManager& );
	CObjectManager& operator= ( const CObjectManager& );

	typedef list< IObject* >		ObjectList;
	typedef ObjectList::iterator	ObjectIter;

	ObjectList	m_Objects;

	bool	m_bPaused;
};

